package de.zainodis.commons.component;

/**
 * A component fulfills a contained task. It may depend on other components to
 * fulfill it's task. Components are owned by {@link IEntity}s.
 * 
 * @author fzarrai
 * 
 */
interface IComponent {

   IEntity getOwner();

   /**
    * {@link Component}s may be requested to update themselves, for instance if
    * components on which a component depends on, have changed.
    */
   void onUpdate();

   /**
    * Callback for when a component is removed from an entity. Implementing
    * classes are advised to cleanup at this point.
    */
   void onRemove();
}
